import axios from 'axios'

export function getUserList(params) {
    return axios.get('/user/list', { params })
}

export function getUser(adminUserId) {
    return axios.get(`/user/${adminUserId}`)
}

export function addUser(data) {
    return axios.post('/user', data)
}

export function updateUser(data) {
    return axios.put('/user', data)
}

export function deleteUser(adminUserId) {
    return axios.delete(`/user/${adminUserId}`)
}

export function updateUserRoles(adminUserId, roleIds) {
    return axios.post(`/user/${adminUserId}/roles`, roleIds)
}
